#ifndef FILEDELETER_H
#define FILEDELETER_H

#include <QObject>
#include <QProcess>
#include <QDir>
#include <QStringList>
#include <QSet>

class FileDeleter : public QObject
{
    Q_OBJECT
public:
    static FileDeleter& getInstance();

    Q_INVOKABLE bool deleteFile(const QString &filePath);
    Q_INVOKABLE QStringList selectAllFiles(const QString &folderPath, const QStringList &filters);
    Q_INVOKABLE QStringList getFileTypes(const QString &folderPath);
    Q_INVOKABLE bool isDirectory(const QString &filePath);  // 新增方法声明

private:
    FileDeleter(QObject *parent = nullptr);
    FileDeleter(const FileDeleter&) = delete;
    FileDeleter& operator=(const FileDeleter&) = delete;
};

#endif // FILEDELETER_H
